package com.castle.fortress.admin.oa.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.castle.fortress.admin.oa.entity.AttendanceRecordEntity;
import com.castle.fortress.admin.oa.dto.AttendanceRecordDto;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.HashMap;
import java.util.Map;
import java.util.List;

/**
 * 上下班考勤记录 服务类
 *
 * @author whc
 * @since 2022-11-04
 */
public interface AttendanceRecordService extends IService<AttendanceRecordEntity> {

    /**
     * 分页展示上下班考勤记录列表
     * @param page
     * @param attendanceRecordDto
     * @return
     */
    IPage<AttendanceRecordDto> pageAttendanceRecord(Page<AttendanceRecordDto> page, AttendanceRecordDto attendanceRecordDto);

	/**
	 * 分页展示上下班考勤记录扩展列表
	 * @param page
	 * @param attendanceRecordDto
	 * @return
	 */
	IPage<AttendanceRecordDto> pageAttendanceRecordExtends(Page<AttendanceRecordDto> page, AttendanceRecordDto attendanceRecordDto);
	/**
	 * 上下班考勤记录扩展详情
	 * @param id 上下班考勤记录id
	 * @return
	 */
    AttendanceRecordDto getByIdExtends(Long id);

    /**
     * 展示上下班考勤记录列表
     * @param attendanceRecordDto
     * @return
     */
    List<AttendanceRecordDto> listAttendanceRecord(AttendanceRecordDto attendanceRecordDto);

	/**
	 * 根据日期/用户/上下班 查询记录
	 * @param query
	 * @return
	 */
	AttendanceRecordEntity getByDate(HashMap<String, Object> query);
}
